//index.js
//获取应用实例
var app = getApp()
Page({
  data: {
    article: {}
  },
  onLoad: function (query) {
    var that = this
    console.log(query.id)
    wx.request({
      url: 'http://www.weiapp.cy/index.php?s=/Home/Cms/getDetail', 
      data: {
        id: query.id,
      },
      header: {
        'content-type': 'application/json'
      },
      success: function (res) {
        var article=that.data.article;
        that.setData({
          article:res.data
        });
      }
    })
  }
})
